package com.edu.mapper;
/*
 * @Author:princess
 * @Date 2023/9/20 09 20 19:26
 *
 */

import com.edu.bean.TbUser;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface TbUserMapper {
    @Select("select * from tb_user where id = #{id}")
    TbUser selectTbUserById(int id);

    @Select("select * from tb_user")
    List<TbUser> selectAllTbUser();

    @Insert("insert into tb_user values(#{id},#{username},#{password})")
    int insertTbUser(TbUser tbUser);

    @Delete("delete from tb_user where id = #{id}")
    int deleteById(int id);

    @Update("update tb_user set username=#{username},password=#{password} where id = #{id}")
    int updateTbUser(TbUser tbUser);
}
